package com.shop.servlet;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


@WebServlet("/orderServlet")
public class orderServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
       
    
    public orderServlet() {
        super();
    }

	
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {		
		request.setCharacterEncoding("utf-8");
		response.setCharacterEncoding("utf-8");		
		String bank = request.getParameter("bank");		
		System.out.println(bank);
		if (bank.equals("工商银行")) {
			response.sendRedirect("https://b2c.icbc.com.cn/icbc/newperbank/includes/preventLowerMacSysVersionTip.jsp?flag=3&minversion=21.0&maxversion=24.9&exceptionversion=");					
		}else if (bank.equals("中国银行")) {
			response.sendRedirect("https://ebspay.boc.cn/PGWPortal/RecvOrder.do");			
		} else if (bank.equals("农业银行")) {
			response.sendRedirect("http://www.95599.cn/errors/Error404.htm");
		}else if (bank.equals("交通银行")) {			
			response.sendRedirect("https://pbank.95559.com.cn/personbank/index.html#");
		}else if (bank.equals("平安银行")) {			
			response.sendRedirect("https://ebank.pingan.com.cn/pay/peps/gateway/common/error.html");
		}else if (bank.equals("建设银行")) {			
			response.sendRedirect("https://ibsbjstar.ccb.com.cn/CCBIS/B2CMainPlat_08_EPAY?CLIENTIP=118.112.75.163&BRANCHID=110000000&SMEPROTYPE=1000&REGINFO=&CURCODE=01&PROINFO=%25u7F51%25u4E0A%25u652F%25u4ED8&ORDERID=5295353925180806&PRONAME=%25u767E%25u8D27%25u7C7B%25u578B&REFERER=&TYPE=1&SMERTYPE=%25u666E%25u901A%25u5546%25u6237&TRADENAME=%25u6D88%25u8D39&SMERTYPEID=5611&REMARK1=REMARK1&REMARK2=REMARK2&TXCODE=520100&TRADECODE=wszf006&CCB_IBSVersion=V6&GATEWAY=W2Z1&MERCHANTID=105110089999093&SMERID=10001126856&POSID=567750922&PAYMENT=0.01&MAC=a45c0472cfbf21371891bc758b3039c5&SMERNAME=%25u5185%25u90E8%25u6D4B%25u8BD5%25u8D26%25u6237%25u7F51%25u94F6%25u5BF9%25u63A5%25u8F6C%25u7528&QRCODE=1&CHANNEL=1");
		}else if (bank.equals("光大银行")) {		
			response.sendRedirect("https://www.cebbank.com/per/newPreEpayLogin.do?_locale=zh_CN");
		}else if (bank.equals("招商银行")) {			
			response.sendRedirect("https://netpay.cmbchina.com/netpayment/BaseHttp.dll?PrePayC1");
		}
	}

	
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		doGet(request, response);
	}

}
